<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
    *{margin:0; padding:0;}
    .ell{
      text-overflow:ellipsis;
      white-space:nowrap;
      overflow:hidden;
    }
    
    .ell2{
      display:-webkit-box;
      -webkit-box-orient:vertical;
      -webkit-line-clamp:2;
      
      white-space:normal;
    }
  </style>
</head>
<body>
  <div class="ell ell2">测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测</div>
</body>
</html>